package com.gdw.controller;

import com.gdw.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

@Controller
public class UserController2 {

    @Autowired
    private User user;

    public void printUser2(){
        System.out.println("User name:" + user.getName());
    }
}

